﻿using System;
using System.Reflection;
using System.Resources;
using System.Threading;

namespace NMemcached.Client.Configuration
{
    internal static class StringTable
    {
        private static readonly ResourceManager _resources;

        static StringTable()
        {
            StringTable._resources = new ResourceManager("NMemcached.Client.Properties.Resources", Assembly.GetExecutingAssembly());
        }

        public static string Get(string key)
        {
            if (String.IsNullOrWhiteSpace(key))
            {
                throw new ArgumentNullException("key");
            }

            return StringTable._resources.GetString(key, Thread.CurrentThread.CurrentUICulture);
        }
    }
}